package com.azusa.common.transform.descriptor;

import java.util.HashMap;
import java.util.Map;

/**
 * 对使用了@TBean注解的普通JavaBean类的描述。这样的JavaBean主要事用来转换成XML和JSON字符串的。
 * <p>类功能说明:</p>
 * <p>Class Function Description:</p>
 * <p>Title: BeanDescriptor.java</p> 
 * <p>Description:Azusa</p>
 * <p>Copyright: Copyright © 2013 Leonard Lan.All Rights Reserved.</p>
 * <p>Company:Azusa</p>
 * @author Leonard Lan
   @date Oct 16, 2013 10:41:57 AM
 * @version v1.0
 * @since azusa-commons v1.0.0
 */
public class BeanDescriptor {
	/** BeanDescriptor的名字.如果@TBean中的name不为空，则为@TBean中的name值;否则就是这个javaBean的类名. */
	private String name;
	
	/**被@TBean注解的JavaBean中container的值*/
	private String container;
	
	/** JavaBean的Class信息*/
	private Class<?> beanClass;
	
	/** 这个JavaBean中被@TField注解的字段描述*/
    private Map<String, FieldDescriptor> fieldDescriptors = new HashMap<String, FieldDescriptor>();
	
    /** 这个JavaBean中被@NameSpaces注解的命名空间描述 */
	private NameSpacesDescriptor nameSpacesDescriptor;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContainer() {
		return container;
	}

	public void setContainer(String container) {
		this.container = container;
	}

	public Class<?> getBeanClass() {
		return beanClass;
	}

	public void setBeanClass(Class<?> beanClass) {
		this.beanClass = beanClass;
	}

	public Map<String, FieldDescriptor> getFieldDescriptors() {
		return fieldDescriptors;
	}

	public void setFieldDescriptors(Map<String, FieldDescriptor> fieldDescriptors) {
		this.fieldDescriptors = fieldDescriptors;
	}

	public NameSpacesDescriptor getNameSpacesDescriptor() {
		return nameSpacesDescriptor;
	}

	public void setNameSpacesDescriptor(NameSpacesDescriptor nameSpacesDescriptor) {
		this.nameSpacesDescriptor = nameSpacesDescriptor;
	}
}
